package com.zyh.javase_shijuan.test2.domain;

public class Dog extends Animal implements Sports{
    public Dog(String name) {
        super(name);
    }

    @Override
    void speak(String str) {
        System.out.println(getName()+"说："+str);
    }

    @Override
    public void swimming() {
        System.out.println(getName()+"狗刨中！");
    }
    public void goPlay(){
        speak("我去玩了");
        swimming();
    }
}
